import request from '@/utils/request'

export function getPage(query) {
  return request({
    url: '/web-api/base/enterprise/listPage',
    method: 'get',
    params: query
  })
}
export function getById(id) {
  return request({
    url: '/web-api/base/enterprise/' + id,
    method: 'get'
  })
}
export function add(data) {
  return request({
    url: '/web-api/base/enterprise/add',
    method: 'post',
    data
  })
}
export function edit(data) {
  return request({
    url: '/web-api/base/enterprise/edit',
    method: 'put',
    data
  })
}

export function del(id) {
  return request({
    url: '/web-api/base/enterprise/'+ id,
    method: 'delete',

  })
}

export function download(query) {
  return request({
    url: '/web-api/base/enterprise/export',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
